package com.cdzg.cloud.money.resp;

import com.cdzg.cloud.money.constant.ResultCode;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author liuchao
 * @email liuchao@cdzgph.com
 * @date 2020/1/13 17:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResp implements Serializable {

    @ApiModelProperty("返回码")
    private Integer code;

    @ApiModelProperty("回执信息")
    private String msg;

    public BaseResp(ResultCode resultCode) {
        this.code = resultCode.getKey();
        this.msg = resultCode.getValue();
    }
}
